package dobest.ray.com.jiongjiong.adapter;

import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.dobest.ray.corelibs.utils.ViewHolder;
import com.squareup.picasso.Picasso;

import dobest.ray.com.jiongjiong.R;
import dobest.ray.com.jiongjiong.views.CanAdapterImageView;

/**
 * Created by Ray on 2016/3/17.
 * https://github.com/ray0807
 */
public class WantToKnowBaseAdapter extends BaseAdapter {
    private Context context;

    public WantToKnowBaseAdapter(Context context) {
        this.context = context;
    }

    @Override
    public int getCount() {
        return 5;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View view, ViewGroup parent) {
        if (view == null) {
            view = LayoutInflater.from(context).inflate(R.layout.item_want_to_know, null);
        }
        CanAdapterImageView caiv_icon = ViewHolder.get(view, R.id.caiv_icon);
        Picasso.with(context).load("http://news.cpd.com.cn/n203193/c29251112/part/29251910.jpg").config(Bitmap.Config.RGB_565).into(caiv_icon);
        return view;
    }
}
